<?php
	require_once 'org/kahikai/database/fs/FsPictureDao.php';
	require_once 'org/kahikai/database/mysql/MysqlAliasDao.php';
	require_once 'org/kahikai/database/mysql/MysqlDevelopmentDao.php';
	require_once 'org/kahikai/database/mysql/MysqlGeneDao.php';
	require_once 'org/kahikai/database/mysql/MysqlGeneExpressionDao.php';
	require_once 'org/kahikai/database/mysql/MysqlLanguageDao.php';
	require_once 'org/kahikai/database/mysql/MysqlPaperDao.php';
	require_once 'org/kahikai/database/mysql/MysqlPhylogenyDao.php';
	require_once 'org/kahikai/database/mysql/MysqlSpeciesDao.php';
	
	use org\kahikai\database\fs\FsPictureDao;
	use org\kahikai\database\mysql\MysqlAliasDao;
	use org\kahikai\database\mysql\MysqlDevelopmentDao;
	use org\kahikai\database\mysql\MysqlGeneDao;
	use org\kahikai\database\mysql\MysqlGeneExpressionDao;
	use org\kahikai\database\mysql\MysqlLanguageDao;
	use org\kahikai\database\mysql\MysqlPaperDao;
	use org\kahikai\database\mysql\MysqlPhylogenyDao;
	use org\kahikai\database\mysql\MysqlSpeciesDao;
	
	if(!isset($_SESSION['languageDao'])) {
		$_SESSION['languageDao'] = new MysqlLanguageDao();
	}
	if(!isset($_SESSION['aliasDao'])) {
		$_SESSION['aliasDao'] = new MysqlAliasDao($_SESSION['languageDao']);
	}
	if(!isset($_SESSION['pictureDao'])) {
		$_SESSION['pictureDao'] = new FsPictureDao();
	}
	if(!isset($_SESSION['developmentDao'])) {
		$_SESSION['developmentDao'] = new MysqlDevelopmentDao($_SESSION['pictureDao']);
	}
	if(!isset($_SESSION['geneDao'])) {
		$_SESSION['geneDao'] = new MysqlGeneDao($_SESSION['aliasDao']);
	}
	if(!isset($_SESSION['geneExpressionDao'])) {
		$_SESSION['geneExpressionDao'] = new MysqlGeneExpressionDao();
	}
	if(!isset($_SESSION['paperDao'])) {
		$_SESSION['paperDao'] = new MysqlPaperDao();
	}
	if(!isset($_SESSION['phylogenyDao'])) {
		$_SESSION['phylogenyDao'] = new MysqlPhylogenyDao();
	}
	if(!isset($_SESSION['speciesDao'])) {
		$_SESSION['speciesDao'] = new MysqlSpeciesDao($_SESSION['aliasDao'], $_SESSION['paperDao'], $_SESSION['phylogenyDao'], $_SESSION['geneDao'], $_SESSION['developmentDao'], $_SESSION['geneExpressionDao']);
	}
?>